package com.coyote.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.coyote.common.base.PageUtils;
import com.coyote.entity.HelloPay;
import com.coyote.web.mapper.ExampleTwoMapper;
import com.coyote.web.service.ExampleTwoService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ExampleTwoServiceImpl extends ServiceImpl<ExampleTwoMapper, HelloPay> implements ExampleTwoService {

    @Resource
    private ExampleTwoMapper exampleTwoMapper;

    @Override
    public PageUtils<HelloPay> listPage(Integer page, Integer pageSize) {
        PageHelper.startPage(page, pageSize);
        List<HelloPay> list = list();
        PageInfo<HelloPay> pageInfo = new PageInfo<>(list);
        return PageUtils.convertPageInfo(pageInfo);
    }

    @Override
    public PageUtils<HelloPay> listPage(HelloPay param) {
        return null;
    }

    @Override
    public boolean insertt(HelloPay param) {
        return exampleTwoMapper.insert(param) >= 0;
    }
}
